package com.autonavi.adphoto.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.autonavi.adphoto.dao.PhotoDao;
import com.autonavi.adphoto.dao.StepDao;
import com.autonavi.adphoto.entity.Photo;
import com.autonavi.adphoto.entity.Step;

@Service
public class StepService {
	@Autowired
	private StepDao stepDao;

	@Autowired
	private PhotoDao photoDao;

	@Transactional
	public List<Step> save(List<Step> stepList) {
		return stepDao.save(stepList);
	}

	@Transactional
	public void save(List<Step> stepList, List<Photo> photoList) {
		stepDao.save(stepList);
		photoDao.save(photoList);
	}

}
